package com.yupi.yupao.service;

import com.yupi.yupao.model.domain.Team;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yupao.model.domain.User;
import com.yupi.yupao.model.domain.dto.TeamQuery;
import com.yupi.yupao.model.domain.request.TeamJoinRequest;
import com.yupi.yupao.model.domain.request.TeamQuitRequest;
import com.yupi.yupao.model.domain.request.TeamUpdateRequest;
import com.yupi.yupao.model.vo.TeamUserMapVO;
import com.yupi.yupao.model.vo.TeamUserVO;
import com.yupi.yupao.model.vo.WxTokenVO;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
* @author 李皮特
* @description 针对表【team(队伍)】的数据库操作Service
* @createDate 2024-05-07 11:21:34
*/

public interface TeamService extends IService<Team> {
    /**
     * 创建队伍
     * @param team 队伍实体
     * @param loginUser 当前登录用户
     * @return
     */
        Long createTeam(Team team, User loginUser);

    TeamUserMapVO listTeams(TeamQuery teamQuery, boolean isAdmin);

    boolean updateTeam(TeamUpdateRequest teamUpdateRequest, User loginUser);

    boolean JoinTeam(TeamJoinRequest teamJoinRequest, User loginUser);

    boolean quitTeam(TeamQuitRequest teamQuitRequest, User loginUser);

    boolean deleteTeam(long id, User loginUser);

    Object fileUpload(MultipartFile file);

    WxTokenVO getAccessToken();
    //发送邀请
    void saveInvitation(Long senderId, Long receiverId, String message);
    //获取未读消息
    Map<Object, Object> getUnreadInvitations(Long receiverId);
    //标记已读
    Boolean markInvitationsAsRead(Long teamId);

    Map<String, String> getOSSPolicy();
}
